{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import seaborn as sns\n",
    "import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 全局参数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_table1_file=\"../data/家庭财务数据记录.xlsx\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据导入"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "df1=pd.read_excel(data_table1_file,header=2)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 预览"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "#df1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 总览"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "code_folding": [
     0
    ]
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>备注</th>\n",
       "      <th>金额</th>\n",
       "      <th>时间</th>\n",
       "      <th>收支</th>\n",
       "      <th>责任人</th>\n",
       "      <th>类型</th>\n",
       "      <th>年</th>\n",
       "      <th>月</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>例子</td>\n",
       "      <td>0.1</td>\n",
       "      <td>2019-02-16</td>\n",
       "      <td>收入</td>\n",
       "      <td>孙月生</td>\n",
       "      <td>现金</td>\n",
       "      <td>2019.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>4800.0</td>\n",
       "      <td>2019-02-16</td>\n",
       "      <td>收入</td>\n",
       "      <td>孙月生</td>\n",
       "      <td>现金</td>\n",
       "      <td>2019.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    备注      金额          时间  收支  责任人  类型       年    月\n",
       "0   例子     0.1  2019-02-16  收入  孙月生  现金  2019.0  2.0\n",
       "2  NaN  4800.0  2019-02-16  收入  孙月生  现金  2019.0  2.0"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "class Func:\n",
    "    def __init__(self,df):\n",
    "        if isinstance(df,pd.DataFrame):\n",
    "            self.df=df\n",
    "        else:\n",
    "            raise TypeError\n",
    "    \n",
    "    \n",
    "    def groupby(key=\"\",v=\"2019\",**kawgs):\n",
    "        if key ==\"年\":\n",
    "            pass\n",
    "        if key == \"月\":\n",
    "            pass\n",
    "        if key == \"责任人\":\n",
    "            pass\n",
    "        if key == \"类型\":\n",
    "            pass\n",
    "        if key == \"收支\":\n",
    "            pass\n",
    "    \n",
    "    def filter(self,*arg):\n",
    "        r=arg[0]\n",
    "        for i in arg:\n",
    "            r&=i\n",
    "        return  self.df[r]\n",
    "        \n",
    "            \n",
    "                                       \n",
    "d={}\n",
    "\n",
    "d[u\"年\"]=2019\n",
    "d[u\"负责人\"]=u\"孙月生\"  \n",
    "d[u\"收支\"]=u\"支出\"\n",
    "f=Func(df1)\n",
    "f.filter(df1[u'收支']==u'收入',df1[u'责任人']==u'孙月生')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2019.0\n",
      "       备注       金额             时间  收支  责任人    类型       年    月\n",
      "0      例子      0.1     2019-02-16  收入  孙月生    现金  2019.0  2.0\n",
      "1      例子      0.1     2019-02-16  支出  胡玉仙  股票基金  2019.0  2.0\n",
      "2     NaN   4800.0     2019-02-16  收入  孙月生    现金  2019.0  2.0\n",
      "3     NaN    100.0     2019-02-16  支出  孙月生    现金  2019.0  2.0\n",
      "4      结余  18000.0     2019-02-16  收入  胡玉仙    定期  2019.0  2.0\n",
      "5      结余  48715.0     2019-02-16  收入   孙俊  股票基金  2019.0  2.0\n",
      "6      结余  18251.0     2019-02-16  收入   孙俊    现金  2019.0  2.0\n",
      "7     NaN    100.0     2019-02-17  支出  孙月生    现金  2019.0  2.0\n",
      "8     NaN    100.0     2019-02-18  支出  孙月生    现金  2019.0  2.0\n",
      "9     NaN    100.0     2019-02-20  支出  孙月生    现金  2019.0  2.0\n",
      "10    NaN    100.0     2019-02-21  支出  孙月生    现金  2019.0  2.0\n",
      "11    NaN    100.0     2019-02-23  支出  孙月生    现金  2019.0  2.0\n",
      "12    NaN    100.0     2019-02-23  支出  孙月生    现金  2019.0  2.0\n",
      "13    NaN    100.0     2019-02-24  支出  孙月生    现金  2019.0  2.0\n",
      "14   手机违约   1000.0     2019-02-24  支出  孙月生    现金  2019.0  2.0\n",
      "15    NaN    100.0     2019-02-26  支出  孙月生    现金  2019.0  2.0\n",
      "16    NaN    100.0  2019-02-27 07  支出  孙月生   NaN  2019.0  2.0\n",
      "17  公交季度票    200.0  2019-03-01 07  支出  孙月生   NaN  2019.0  3.0\n",
      "18    NaN    100.0  2019-03-03 10  支出  孙月生   NaN  2019.0  3.0\n",
      "19  游戏币出售    500.0  2019-03-03 10  收入   孙俊    现金  2019.0  3.0\n",
      "20    NaN    100.0  2019-03-04 07  支出  孙月生   NaN  2019.0  3.0\n",
      "21    NaN    100.0  2019-03-06 07  支出  孙月生   NaN  2019.0  3.0\n",
      "+++++++++++++++++++++++++\n"
     ]
    }
   ],
   "source": [
    "grouped = df1.groupby('年')\n",
    "for i,j in grouped:\n",
    "    print(i)\n",
    "    print(j)\n",
    "    print(\"+++++++++++++++++++++++++\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "孙月生 2月 收入共 4800.1 \n",
      "孙月生 2月 支出共 2000.0，平均每天 71 月结余 2800\n",
      "\n",
      "孙月生 3月 收入共 4740.0 \n",
      "孙月生 3月 支出共 2870.0，平均每天 92 月结余 1870\n",
      "\n",
      "截至今天 2019-04-15 15:27:11\n",
      "15\n",
      "孙月生 4月 收入共 0.0 \n",
      "孙月生 4月 支出共 1120.0，平均每天 74 月结余 -1120\n",
      "\n"
     ]
    }
   ],
   "source": [
    "data_table1_file=\"../data/家庭财务数据记录.xlsx\"\n",
    "import pandas as pd\n",
    "import time,datetime\n",
    "df1=pd.read_excel(data_table1_file,header=2)\n",
    "per_month_day_cnt={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}\n",
    "\n",
    "def filter(收支=None,责任人=\"孙月生\",月=None):\n",
    "    filter_df=df1[(df1[u'收支']==收支) & (df1[u'责任人']==责任人)&(df1[u'月']==月)]\n",
    "#     print(filter_df['金额'].sum()) \n",
    "#     print(filter_df['金额'].mean()) \n",
    "    return filter_df['金额']\n",
    "man=\"孙月生\"\n",
    "month=2\n",
    "class per_month_total:\n",
    "    def __init__(self ,man=None,month=None):\n",
    "               \n",
    "        nowdate=datetime.datetime.now()\n",
    "        if month==nowdate.month:\n",
    "            now =time.strftime('%Y-%m-%d %H:%M:%S')\n",
    "            print(f\"截至今天 { now}\")\n",
    "            avg=nowdate.day\n",
    "            print(avg)\n",
    "        else:\n",
    "            avg=per_month_day_cnt[month]\n",
    "        s=filter(\"收入\",man,month)\n",
    "        sum_in=s.sum()\n",
    "        s_count_in=f\"{man} {month}月 收入共 {sum_in} \\n\"\n",
    "        \n",
    "        s=filter(\"支出\",man,month)\n",
    "        sum_out=s.sum()\n",
    "        s_count_out=f\"{man} {month}月 支出共 {sum_out}，平均每天 { int(sum_out/avg) } 月结余 {int(sum_in-sum_out)}\\n\"\n",
    "        print(s_count_in+s_count_out)\n",
    "        self.s_count_in=s_count_in\n",
    "        self.s_count_out=s_count_out\n",
    "        \n",
    "        \n",
    "    def money_of_month(self):\n",
    "\n",
    "        return self.s_count_in+self.s_count_out\n",
    "out=\"\"\n",
    "for i in range(2,5):\n",
    "    \n",
    "    out+=per_month_total(man,i).money_of_month()\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 微信"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 登陆"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import wxpy as wx\n",
    "bot=wx.Bot()\n",
    "#不在jupyter内显示\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 机器人"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "孙月生 3月 收入共 240.0 \n",
      "孙月生 3月 支出共 750.0，平均每天 75\n",
      "\n",
      "孙月生 2月 收入共 4800.1 \n",
      "孙月生 2月 支出共 2000.0，平均每天 71\n",
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "↪ 文件传输助手 : 孙月生 2月 收入共 4800.1  ↩ 孙月生 2月 支出共 2000.0，平均每天 71 ↩  (Text)"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 搜索名称含有 \"游否\" 的男性深圳好友\n",
    "#my_friend = bot.friends().search('filehelper') #找不到\n",
    "my_friend = bot.friends().search('儿子')\n",
    "#my_friend = bot.friends().search('杭州') #群找不到\n",
    "\n",
    "#my_friend.send(\"hello Wechat\")\n",
    "\n",
    "#文件助手\n",
    "filehelp=bot.file_helper\n",
    "#filehelp.send('hello')\n",
    "\n",
    "son=my_friend[0]\n",
    "\n",
    "filehelp.send(per_month_total(man,3).money_of_month())\n",
    "filehelp.send(per_month_total(man,2).money_of_month())\n",
    "#wx.embed()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 群"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<Member: 🙈>\n",
      "<Member: 徐徐徐😳😳😳>\n",
      "<Member: 童宗乐>\n",
      "<Member: luqipeng>\n",
      "<Member: ww w>\n",
      "<Member: iced>\n"
     ]
    }
   ],
   "source": [
    "wxpy_groups = bot.groups().search('home')\n",
    "wxpy_groups\n",
    "if wx.ensure_one(wxpy_groups) :\n",
    "    ghome=wxpy_groups[0]\n",
    "else:\n",
    "    raise\n",
    "ghome.send('hello')\n",
    "#g720char=wx.Chat(bot=wxpy_groups)\n",
    "#g720char.send('hello')\n",
    "for member in ghome:\n",
    "    print(member)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 线程"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 学说话\n",
    "import asyncio\n",
    "loop=asyncio.get_event_loop()\n",
    "\n",
    "\n",
    "\n",
    "@bot.register([filehelp, g720char],\"TEXT\")\n",
    "def auto_reply(msg):\n",
    "    # 如果是群聊，但没有被 @，则不回复\n",
    "    if isinstance(msg.chat, Group) and not msg.is_at:\n",
    "        return\n",
    "    else:\n",
    "        # 回复消息内容和类型\n",
    "        return '收到消息: {} ({})'.format(msg.text, msg.type)\n",
    "\n",
    "@bot.register()\n",
    "def print_messages(msg):\n",
    "    print(msg)\n",
    "    \n",
    "bot.join()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 柱状图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2016"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "date_str = \"2016-11-30 13:53:59\"\n",
    "a=datetime.datetime.strptime(date_str, \"%Y-%m-%d %H:%M:%S\")\n",
    "a.year                          "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    " df1=df1.groupby(['年'])['cnt_view','cnt_click'].sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-27-dc18dc4d4ec4>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mtime\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m     \u001b[0mtime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "import time\n",
    "for i in range(10):\n",
    "    time.sleep(1)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import datetime\n",
    "import time\n",
    "time.time()\n",
    "date=datetime.datetime.now()\n",
    "date.day"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 每周1发送消费情况 本月和上月的统计\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "█\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Getting uuid of QR code.\n",
      "Downloading QR code.\n",
      "Please scan the QR code to log in.\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import datetime\n",
    "data_table1_file=\"../data/家庭财务数据记录.xlsx\"\n",
    "#df1=pd.read_excel(data_table1_file,header=2)\n",
    "per_month_day_cnt={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}\n",
    "\n",
    "\n",
    "man=\"孙月生\"\n",
    "month=2\n",
    "class per_month_total:\n",
    "    def __init__(self ,man=None,month=None):\n",
    "        \n",
    "        nowdate=datetime.datetime.now()\n",
    "        df1=pd.read_excel(data_table1_file,header=2)  \n",
    "        def filter(收支=None,责任人=\"孙月生\",月=None):\n",
    "     \n",
    "            filter_df=df1[(df1[u'收支']==收支) & (df1[u'责任人']==责任人)&(df1[u'月']==月)]\n",
    "        #     print(filter_df['金额'].sum()) \n",
    "        #     print(filter_df['金额'].mean()) \n",
    "            return filter_df['金额']\n",
    "        \n",
    "        if month==nowdate.month:\n",
    "\n",
    "            avg=nowdate.day\n",
    "        else:\n",
    "            avg=per_month_day_cnt[month]\n",
    "        s=filter(\"收入\",man,month)\n",
    "        s_count_in=f\"{man} {month}月 收入共 {s.sum()} \\n\"\n",
    "        s=filter(\"支出\",man,month)\n",
    "        s_count_out=f\"{man} {month}月 支出共 {s.sum()}，平均每天 { int(s.sum()/avg) }\\n\"\n",
    "        print(s_count_in+s_count_out)\n",
    "        self.s_count_in=s_count_in\n",
    "        self.s_count_out=s_count_out\n",
    "        \n",
    "        \n",
    "    def money_of_month(self):\n",
    "\n",
    "        return self.s_count_in+self.s_count_out\n",
    "    \n",
    "import wxpy as wx\n",
    "bot=wx.Bot()\n",
    "filehelp=bot.file_helper\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "code_folding": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "孙月生 3月 收入共 240.0 \n",
      "孙月生 3月 支出共 750.0，平均每天 75\n",
      "\n",
      "孙月生 2月 收入共 4800.1 \n",
      "孙月生 2月 支出共 2000.0，平均每天 71\n",
      "\n",
      "I'm working...2019-03-10 23:52:22\n",
      "I'm working...2019-03-10 23:54:02\n",
      "I'm working...2019-03-10 23:55:43\n",
      "I'm working...2019-03-10 23:57:24\n",
      "I'm working...2019-03-10 23:59:05\n",
      "I'm working...2019-03-11 00:00:45\n",
      "I'm working...2019-03-11 00:02:26\n",
      "I'm working...2019-03-11 00:04:07\n",
      "I'm working...2019-03-11 00:05:48\n",
      "I'm working...2019-03-11 00:07:28\n",
      "I'm working...2019-03-11 00:09:09\n",
      "I'm working...2019-03-11 00:10:50\n",
      "I'm working...2019-03-11 00:12:30\n",
      "I'm working...2019-03-11 00:14:11\n",
      "I'm working...2019-03-11 00:15:52\n",
      "I'm working...2019-03-11 00:17:33\n",
      "I'm working...2019-03-11 00:19:13\n",
      "I'm working...2019-03-11 00:20:54\n",
      "I'm working...2019-03-11 00:22:35\n",
      "I'm working...2019-03-11 00:24:16\n",
      "I'm working...2019-03-11 00:25:57\n",
      "I'm working...2019-03-11 00:27:37\n",
      "I'm working...2019-03-11 00:29:18\n",
      "I'm working...2019-03-11 00:30:59\n",
      "I'm working...2019-03-11 00:32:40\n",
      "I'm working...2019-03-11 00:34:20\n",
      "I'm working...2019-03-11 00:36:01\n",
      "I'm working...2019-03-11 00:37:42\n",
      "I'm working...2019-03-11 00:39:23\n",
      "I'm working...2019-03-11 00:41:03\n",
      "I'm working...2019-03-11 00:42:44\n",
      "I'm working...2019-03-11 00:44:25\n",
      "I'm working...2019-03-11 00:46:05\n",
      "I'm working...2019-03-11 00:47:46\n",
      "I'm working...2019-03-11 00:49:27\n",
      "I'm working...2019-03-11 00:51:08\n",
      "I'm working...2019-03-11 00:52:48\n",
      "I'm working...2019-03-11 00:54:29\n",
      "I'm working...2019-03-11 00:56:10\n",
      "I'm working...2019-03-11 00:57:51\n",
      "I'm working...2019-03-11 00:59:31\n",
      "I'm working...2019-03-11 01:01:12\n",
      "I'm working...2019-03-11 01:02:53\n",
      "I'm working...2019-03-11 01:04:33\n",
      "I'm working...2019-03-11 01:06:14\n",
      "I'm working...2019-03-11 01:07:55\n",
      "I'm working...2019-03-11 01:09:35\n",
      "I'm working...2019-03-11 01:11:16\n",
      "I'm working...2019-03-11 01:12:57\n",
      "I'm working...2019-03-11 01:14:38\n",
      "I'm working...2019-03-11 01:16:18\n",
      "I'm working...2019-03-11 01:17:59\n",
      "I'm working...2019-03-11 01:19:40\n",
      "I'm working...2019-03-11 01:21:20\n",
      "I'm working...2019-03-11 01:23:01\n",
      "I'm working...2019-03-11 01:24:42\n",
      "I'm working...2019-03-11 01:26:22\n",
      "I'm working...2019-03-11 01:28:03\n",
      "I'm working...2019-03-11 01:29:44\n",
      "I'm working...2019-03-11 01:31:25\n",
      "I'm working...2019-03-11 01:33:05\n",
      "I'm working...2019-03-11 01:34:46\n",
      "I'm working...2019-03-11 01:36:27\n",
      "I'm working...2019-03-11 01:38:07\n",
      "I'm working...2019-03-11 01:39:48\n",
      "I'm working...2019-03-11 01:41:29\n",
      "I'm working...2019-03-11 01:43:10\n",
      "I'm working...2019-03-11 01:44:50\n",
      "I'm working...2019-03-11 01:46:31\n",
      "I'm working...2019-03-11 01:48:12\n",
      "I'm working...2019-03-11 01:49:53\n",
      "I'm working...2019-03-11 01:51:33\n",
      "I'm working...2019-03-11 01:53:14\n",
      "I'm working...2019-03-11 01:54:55\n",
      "I'm working...2019-03-11 01:56:36\n",
      "I'm working...2019-03-11 01:58:16\n",
      "I'm working...2019-03-11 01:59:57\n",
      "I'm working...2019-03-11 02:01:38\n",
      "I'm working...2019-03-11 02:03:19\n",
      "I'm working...2019-03-11 02:04:59\n",
      "I'm working...2019-03-11 02:06:40\n",
      "I'm working...2019-03-11 02:08:21\n",
      "I'm working...2019-03-11 02:10:01\n",
      "I'm working...2019-03-11 02:11:42\n",
      "I'm working...2019-03-11 02:13:23\n",
      "I'm working...2019-03-11 02:15:03\n",
      "I'm working...2019-03-11 02:16:44\n",
      "I'm working...2019-03-11 02:18:25\n",
      "I'm working...2019-03-11 02:20:06\n",
      "I'm working...2019-03-11 02:21:46\n",
      "I'm working...2019-03-11 02:23:27\n",
      "I'm working...2019-03-11 02:25:08\n",
      "I'm working...2019-03-11 02:26:49\n",
      "I'm working...2019-03-11 02:28:29\n",
      "I'm working...2019-03-11 02:30:10\n",
      "I'm working...2019-03-11 02:31:51\n",
      "I'm working...2019-03-11 02:33:31\n",
      "I'm working...2019-03-11 02:35:12\n",
      "I'm working...2019-03-11 02:36:53\n",
      "I'm working...2019-03-11 02:38:34\n",
      "I'm working...2019-03-11 02:40:15\n",
      "I'm working...2019-03-11 02:41:55\n",
      "I'm working...2019-03-11 02:43:36\n",
      "I'm working...2019-03-11 02:45:17\n",
      "I'm working...2019-03-11 02:46:57\n",
      "I'm working...2019-03-11 02:48:38\n",
      "I'm working...2019-03-11 02:50:19\n",
      "I'm working...2019-03-11 02:52:00\n",
      "I'm working...2019-03-11 02:53:40\n",
      "I'm working...2019-03-11 02:55:21\n",
      "I'm working...2019-03-11 02:57:02\n",
      "I'm working...2019-03-11 02:58:43\n",
      "I'm working...2019-03-11 03:00:23\n",
      "I'm working...2019-03-11 03:02:04\n",
      "I'm working...2019-03-11 03:03:45\n",
      "I'm working...2019-03-11 03:05:26\n",
      "I'm working...2019-03-11 03:07:06\n",
      "I'm working...2019-03-11 03:08:47\n",
      "I'm working...2019-03-11 03:10:28\n",
      "I'm working...2019-03-11 03:12:09\n",
      "I'm working...2019-03-11 03:13:49\n",
      "I'm working...2019-03-11 03:15:30\n",
      "I'm working...2019-03-11 03:17:11\n",
      "I'm working...2019-03-11 03:18:52\n",
      "I'm working...2019-03-11 03:20:32\n",
      "I'm working...2019-03-11 03:22:13\n",
      "I'm working...2019-03-11 03:23:54\n",
      "I'm working...2019-03-11 03:25:34\n",
      "I'm working...2019-03-11 03:27:15\n",
      "I'm working...2019-03-11 03:28:56\n",
      "I'm working...2019-03-11 03:30:37\n",
      "I'm working...2019-03-11 03:32:17\n",
      "I'm working...2019-03-11 03:33:58\n",
      "I'm working...2019-03-11 03:35:39\n",
      "I'm working...2019-03-11 03:37:20\n",
      "I'm working...2019-03-11 03:39:00\n",
      "I'm working...2019-03-11 03:40:41\n",
      "I'm working...2019-03-11 03:42:22\n",
      "I'm working...2019-03-11 03:44:03\n",
      "I'm working...2019-03-11 03:45:43\n",
      "I'm working...2019-03-11 03:47:24\n",
      "I'm working...2019-03-11 03:49:05\n",
      "I'm working...2019-03-11 03:50:45\n",
      "I'm working...2019-03-11 03:52:26\n",
      "I'm working...2019-03-11 03:54:07\n",
      "I'm working...2019-03-11 03:55:48\n",
      "I'm working...2019-03-11 03:57:29\n",
      "I'm working...2019-03-11 03:59:09\n",
      "I'm working...2019-03-11 04:00:50\n",
      "I'm working...2019-03-11 04:02:31\n",
      "I'm working...2019-03-11 04:04:12\n",
      "I'm working...2019-03-11 04:05:52\n",
      "I'm working...2019-03-11 04:07:33\n",
      "I'm working...2019-03-11 04:09:14\n",
      "I'm working...2019-03-11 04:10:55\n",
      "I'm working...2019-03-11 04:12:35\n",
      "I'm working...2019-03-11 04:14:16\n",
      "I'm working...2019-03-11 04:15:57\n",
      "I'm working...2019-03-11 04:17:38\n",
      "I'm working...2019-03-11 04:19:18\n",
      "I'm working...2019-03-11 04:20:59\n",
      "I'm working...2019-03-11 04:22:40\n",
      "I'm working...2019-03-11 04:24:20\n",
      "I'm working...2019-03-11 04:26:01\n",
      "I'm working...2019-03-11 04:27:42\n",
      "I'm working...2019-03-11 04:29:23\n",
      "I'm working...2019-03-11 04:31:03\n",
      "I'm working...2019-03-11 04:32:44\n",
      "I'm working...2019-03-11 04:34:25\n",
      "I'm working...2019-03-11 04:36:05\n",
      "I'm working...2019-03-11 04:37:46\n",
      "I'm working...2019-03-11 04:39:27\n",
      "I'm working...2019-03-11 04:41:08\n",
      "I'm working...2019-03-11 04:42:48\n",
      "I'm working...2019-03-11 04:44:29\n",
      "I'm working...2019-03-11 04:46:10\n",
      "I'm working...2019-03-11 04:47:51\n",
      "I'm working...2019-03-11 04:49:32\n",
      "I'm working...2019-03-11 04:51:12\n",
      "I'm working...2019-03-11 04:52:53\n",
      "I'm working...2019-03-11 04:54:34\n",
      "I'm working...2019-03-11 04:56:15\n",
      "I'm working...2019-03-11 04:57:55\n",
      "I'm working...2019-03-11 04:59:36\n",
      "I'm working...2019-03-11 05:01:17\n",
      "I'm working...2019-03-11 05:02:58\n",
      "I'm working...2019-03-11 05:04:38\n",
      "I'm working...2019-03-11 05:06:19\n",
      "I'm working...2019-03-11 05:08:00\n",
      "I'm working...2019-03-11 05:09:40\n",
      "I'm working...2019-03-11 05:11:21\n",
      "I'm working...2019-03-11 05:13:02\n",
      "I'm working...2019-03-11 05:14:42\n",
      "I'm working...2019-03-11 05:16:23\n",
      "I'm working...2019-03-11 05:18:04\n",
      "I'm working...2019-03-11 05:19:44\n",
      "I'm working...2019-03-11 05:21:25\n",
      "I'm working...2019-03-11 05:23:06\n",
      "I'm working...2019-03-11 05:24:47\n",
      "I'm working...2019-03-11 05:26:28\n",
      "I'm working...2019-03-11 05:28:08\n",
      "I'm working...2019-03-11 05:29:49\n",
      "I'm working...2019-03-11 05:31:30\n",
      "I'm working...2019-03-11 05:33:11\n",
      "I'm working...2019-03-11 05:34:51\n",
      "I'm working...2019-03-11 05:36:32\n",
      "I'm working...2019-03-11 05:38:13\n",
      "I'm working...2019-03-11 05:39:53\n",
      "I'm working...2019-03-11 05:41:34\n",
      "I'm working...2019-03-11 05:43:15\n",
      "I'm working...2019-03-11 05:44:56\n",
      "I'm working...2019-03-11 05:46:36\n",
      "I'm working...2019-03-11 05:48:17\n",
      "I'm working...2019-03-11 05:49:58\n",
      "I'm working...2019-03-11 05:51:39\n",
      "I'm working...2019-03-11 05:53:19\n",
      "I'm working...2019-03-11 05:55:00\n",
      "I'm working...2019-03-11 05:56:41\n",
      "I'm working...2019-03-11 05:58:21\n",
      "I'm working...2019-03-11 06:00:02\n",
      "I'm working...2019-03-11 06:01:43\n",
      "I'm working...2019-03-11 06:03:24\n",
      "I'm working...2019-03-11 06:05:04\n",
      "I'm working...2019-03-11 06:06:45\n",
      "I'm working...2019-03-11 06:08:26\n",
      "I'm working...2019-03-11 06:10:07\n",
      "I'm working...2019-03-11 06:11:47\n",
      "I'm working...2019-03-11 06:13:28\n",
      "I'm working...2019-03-11 06:15:09\n",
      "I'm working...2019-03-11 06:16:50\n",
      "I'm working...2019-03-11 06:18:30\n",
      "I'm working...2019-03-11 06:20:11\n",
      "I'm working...2019-03-11 06:21:52\n",
      "I'm working...2019-03-11 06:23:33\n",
      "I'm working...2019-03-11 06:25:13\n",
      "I'm working...2019-03-11 06:26:54\n",
      "I'm working...2019-03-11 06:28:35\n",
      "I'm working...2019-03-11 06:30:16\n",
      "I'm working...2019-03-11 06:31:56\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'm working...2019-03-11 06:33:37\n",
      "I'm working...2019-03-11 06:35:18\n",
      "I'm working...2019-03-11 06:36:59\n",
      "I'm working...2019-03-11 06:38:39\n",
      "I'm working...2019-03-11 06:40:20\n",
      "I'm working...2019-03-11 06:42:01\n",
      "I'm working...2019-03-11 06:43:41\n",
      "I'm working...2019-03-11 06:45:22\n",
      "I'm working...2019-03-11 06:47:03\n",
      "I'm working...2019-03-11 06:48:44\n",
      "I'm working...2019-03-11 06:50:24\n",
      "I'm working...2019-03-11 06:52:05\n",
      "I'm working...2019-03-11 06:53:46\n",
      "I'm working...2019-03-11 06:55:27\n",
      "I'm working...2019-03-11 06:57:07\n",
      "I'm working...2019-03-11 06:58:48\n",
      "I'm working...2019-03-11 07:00:29\n",
      "I'm working...2019-03-11 07:02:09\n",
      "I'm working...2019-03-11 07:03:50\n",
      "I'm working...2019-03-11 07:05:31\n",
      "I'm working...2019-03-11 07:07:12\n",
      "I'm working...2019-03-11 07:08:52\n",
      "I'm working...2019-03-11 07:10:33\n",
      "I'm working...2019-03-11 07:12:14\n",
      "I'm working...2019-03-11 07:13:55\n",
      "I'm working...2019-03-11 07:15:35\n",
      "I'm working...2019-03-11 07:17:16\n",
      "I'm working...2019-03-11 07:18:57\n",
      "I'm working...2019-03-11 07:20:38\n",
      "I'm working...2019-03-11 07:22:18\n",
      "I'm working...2019-03-11 07:23:59\n",
      "I'm working...2019-03-11 07:25:40\n",
      "I'm working...2019-03-11 07:27:21\n",
      "I'm working...2019-03-11 07:29:02\n",
      "I'm working...2019-03-11 07:30:42\n",
      "I'm working...2019-03-11 07:32:23\n",
      "I'm working...2019-03-11 07:34:04\n",
      "I'm working...2019-03-11 07:35:45\n",
      "I'm working...2019-03-11 07:37:26\n",
      "I'm working...2019-03-11 07:39:06\n",
      "I'm working...2019-03-11 07:40:47\n",
      "I'm working...2019-03-11 07:42:28\n",
      "I'm working...2019-03-11 07:44:09\n",
      "I'm working...2019-03-11 07:45:49\n",
      "I'm working...2019-03-11 07:47:30\n",
      "I'm working...2019-03-11 07:49:11\n",
      "I'm working...2019-03-11 07:50:52\n",
      "I'm working...2019-03-11 07:52:32\n",
      "I'm working...2019-03-11 07:54:13\n",
      "I'm working...2019-03-11 07:55:54\n",
      "I'm working...2019-03-11 07:57:35\n",
      "I'm working...2019-03-11 07:59:15\n",
      "I'm working...2019-03-11 08:00:56\n",
      "I'm working...2019-03-11 08:02:37\n",
      "I'm working...2019-03-11 08:04:18\n",
      "I'm working...2019-03-11 08:05:58\n",
      "I'm working...2019-03-11 08:07:39\n",
      "I'm working...2019-03-11 08:09:20\n",
      "I'm working...2019-03-11 08:11:01\n",
      "I'm working...2019-03-11 08:12:41\n",
      "I'm working...2019-03-11 08:14:22\n",
      "I'm working...2019-03-11 08:16:03\n",
      "I'm working...2019-03-11 08:17:44\n",
      "I'm working...2019-03-11 08:19:24\n",
      "I'm working...2019-03-11 08:21:05\n",
      "I'm working...2019-03-11 08:22:46\n",
      "I'm working...2019-03-11 08:24:27\n",
      "I'm working...2019-03-11 08:26:07\n",
      "I'm working...2019-03-11 08:27:48\n",
      "I'm working...2019-03-11 08:29:29\n",
      "I'm working...2019-03-11 08:31:10\n",
      "I'm working...2019-03-11 08:32:50\n",
      "I'm working...2019-03-11 08:34:31\n",
      "I'm working...2019-03-11 08:36:12\n",
      "I'm working...2019-03-11 08:37:53\n",
      "I'm working...2019-03-11 08:39:33\n",
      "I'm working...2019-03-11 08:41:14\n",
      "I'm working...2019-03-11 08:42:55\n",
      "I'm working...2019-03-11 08:44:36\n",
      "I'm working...2019-03-11 08:46:16\n",
      "I'm working...2019-03-11 08:47:57\n",
      "I'm working...2019-03-11 08:49:38\n",
      "I'm working...2019-03-11 08:51:18\n",
      "I'm working...2019-03-11 08:52:59\n",
      "I'm working...2019-03-11 08:54:40\n",
      "I'm working...2019-03-11 08:56:21\n",
      "I'm working...2019-03-11 08:58:01\n",
      "I'm working...2019-03-11 08:59:42\n",
      "I'm working...2019-03-11 09:01:23\n",
      "I'm working...2019-03-11 09:03:04\n",
      "I'm working...2019-03-11 09:04:44\n",
      "I'm working...2019-03-11 09:06:25\n",
      "I'm working...2019-03-11 09:08:06\n",
      "I'm working...2019-03-11 09:09:47\n",
      "I'm working...2019-03-11 09:11:28\n",
      "I'm working...2019-03-11 09:13:08\n",
      "I'm working...2019-03-11 09:14:49\n",
      "I'm working...2019-03-11 09:16:30\n",
      "I'm working...2019-03-11 09:18:10\n",
      "I'm working...2019-03-11 09:19:51\n",
      "I'm working...2019-03-11 09:21:32\n",
      "I'm working...2019-03-11 09:23:13\n",
      "I'm working...2019-03-11 09:24:53\n",
      "I'm working...2019-03-11 09:26:34\n",
      "I'm working...2019-03-11 09:28:15\n",
      "I'm working...2019-03-11 09:29:56\n",
      "I'm working...2019-03-11 09:31:36\n",
      "I'm working...2019-03-11 09:33:17\n",
      "I'm working...2019-03-11 09:34:58\n",
      "I'm working...2019-03-11 09:36:39\n",
      "I'm working...2019-03-11 09:38:20\n",
      "I'm working...2019-03-11 09:40:00\n",
      "I'm working...2019-03-11 09:41:41\n",
      "I'm working...2019-03-11 09:43:22\n",
      "I'm working...2019-03-11 09:45:03\n",
      "I'm working...2019-03-11 09:46:43\n",
      "I'm working...2019-03-11 09:48:24\n",
      "I'm working...2019-03-11 09:50:05\n",
      "I'm working...2019-03-11 09:51:46\n",
      "I'm working...2019-03-11 09:53:26\n",
      "I'm working...2019-03-11 09:55:07\n",
      "I'm working...2019-03-11 09:56:48\n",
      "I'm working...2019-03-11 09:58:29\n",
      "I'm working...2019-03-11 10:00:10\n",
      "I'm working...2019-03-11 10:01:50\n",
      "I'm working...2019-03-11 10:03:31\n",
      "I'm working...2019-03-11 10:05:12\n",
      "I'm working...2019-03-11 10:06:53\n",
      "I'm working...2019-03-11 10:08:34\n",
      "I'm working...2019-03-11 10:10:14\n",
      "I'm working...2019-03-11 10:11:55\n",
      "I'm working...2019-03-11 10:13:36\n",
      "I'm working...2019-03-11 10:15:17\n",
      "I'm working...2019-03-11 10:16:57\n",
      "I'm working...2019-03-11 10:18:38\n",
      "I'm working...2019-03-11 10:20:19\n",
      "I'm working...2019-03-11 10:22:00\n",
      "I'm working...2019-03-11 10:23:41\n",
      "I'm working...2019-03-11 10:25:21\n",
      "I'm working...2019-03-11 10:27:02\n",
      "I'm working...2019-03-11 10:28:43\n",
      "I'm working...2019-03-11 10:30:24\n",
      "I'm working...2019-03-11 10:32:04\n",
      "I'm working...2019-03-11 10:33:45\n",
      "I'm working...2019-03-11 10:35:26\n",
      "I'm working...2019-03-11 10:37:07\n",
      "I'm working...2019-03-11 10:38:48\n",
      "I'm working...2019-03-11 10:40:29\n",
      "I'm working...2019-03-11 10:42:09\n",
      "I'm working...2019-03-11 10:43:50\n",
      "I'm working...2019-03-11 10:45:31\n",
      "I'm working...2019-03-11 10:47:12\n",
      "I'm working...2019-03-11 10:48:52\n",
      "I'm working...2019-03-11 10:50:33\n",
      "I'm working...2019-03-11 10:52:14\n",
      "I'm working...2019-03-11 10:53:54\n",
      "I'm working...2019-03-11 10:55:35\n",
      "I'm working...2019-03-11 10:57:16\n",
      "I'm working...2019-03-11 10:58:57\n",
      "I'm working...2019-03-11 11:00:37\n",
      "I'm working...2019-03-11 11:02:18\n",
      "I'm working...2019-03-11 11:03:59\n",
      "I'm working...2019-03-11 11:05:39\n",
      "I'm working...2019-03-11 11:07:20\n",
      "I'm working...2019-03-11 11:09:01\n",
      "I'm working...2019-03-11 11:10:41\n",
      "I'm working...2019-03-11 11:12:22\n",
      "I'm working...2019-03-11 11:14:03\n",
      "I'm working...2019-03-11 11:15:44\n",
      "I'm working...2019-03-11 11:17:24\n",
      "I'm working...2019-03-11 11:19:05\n",
      "I'm working...2019-03-11 11:20:46\n",
      "I'm working...2019-03-11 11:22:26\n",
      "I'm working...2019-03-11 11:24:07\n",
      "I'm working...2019-03-11 11:25:48\n",
      "I'm working...2019-03-11 11:27:29\n",
      "I'm working...2019-03-11 11:29:10\n",
      "I'm working...2019-03-11 11:30:50\n",
      "I'm working...2019-03-11 11:32:31\n",
      "I'm working...2019-03-11 11:34:12\n",
      "I'm working...2019-03-11 11:35:53\n",
      "I'm working...2019-03-11 11:37:33\n",
      "I'm working...2019-03-11 11:39:14\n",
      "I'm working...2019-03-11 11:40:55\n",
      "I'm working...2019-03-11 11:42:36\n",
      "I'm working...2019-03-11 11:44:16\n",
      "I'm working...2019-03-11 11:45:57\n",
      "I'm working...2019-03-11 11:47:38\n",
      "I'm working...2019-03-11 11:49:19\n",
      "I'm working...2019-03-11 11:51:00\n",
      "I'm working...2019-03-11 11:52:40\n",
      "I'm working...2019-03-11 11:54:21\n",
      "I'm working...2019-03-11 11:56:02\n",
      "I'm working...2019-03-11 11:57:43\n",
      "I'm working...2019-03-11 11:59:23\n",
      "I'm working...2019-03-11 12:01:04\n",
      "I'm working...2019-03-11 12:02:45\n",
      "I'm working...2019-03-11 12:04:26\n",
      "I'm working...2019-03-11 12:06:06\n",
      "I'm working...2019-03-11 12:07:47\n",
      "I'm working...2019-03-11 12:09:27\n",
      "I'm working...2019-03-11 12:11:08\n",
      "I'm working...2019-03-11 12:12:49\n",
      "I'm working...2019-03-11 12:14:30\n",
      "I'm working...2019-03-11 12:16:10\n",
      "I'm working...2019-03-11 12:17:51\n",
      "I'm working...2019-03-11 12:19:32\n",
      "I'm working...2019-03-11 12:21:13\n",
      "I'm working...2019-03-11 12:22:53\n",
      "I'm working...2019-03-11 12:24:34\n",
      "I'm working...2019-03-11 12:26:15\n",
      "I'm working...2019-03-11 12:27:56\n",
      "I'm working...2019-03-11 12:29:37\n",
      "I'm working...2019-03-11 12:31:17\n",
      "I'm working...2019-03-11 12:32:58\n",
      "I'm working...2019-03-11 12:34:39\n",
      "I'm working...2019-03-11 12:36:20\n",
      "I'm working...2019-03-11 12:38:00\n",
      "I'm working...2019-03-11 12:39:41\n",
      "I'm working...2019-03-11 12:41:22\n",
      "I'm working...2019-03-11 12:43:03\n",
      "I'm working...2019-03-11 12:44:43\n",
      "I'm working...2019-03-11 12:46:24\n",
      "I'm working...2019-03-11 12:48:05\n",
      "I'm working...2019-03-11 12:49:46\n",
      "I'm working...2019-03-11 12:51:26\n",
      "I'm working...2019-03-11 12:53:07\n",
      "I'm working...2019-03-11 12:54:48\n",
      "I'm working...2019-03-11 12:56:29\n",
      "I'm working...2019-03-11 12:58:09\n",
      "I'm working...2019-03-11 12:59:50\n",
      "I'm working...2019-03-11 13:01:31\n",
      "I'm working...2019-03-11 13:03:12\n",
      "I'm working...2019-03-11 13:04:53\n",
      "I'm working...2019-03-11 13:06:33\n",
      "I'm working...2019-03-11 13:08:14\n",
      "I'm working...2019-03-11 13:09:55\n",
      "I'm working...2019-03-11 13:11:36\n",
      "I'm working...2019-03-11 13:13:17\n",
      "I'm working...2019-03-11 13:14:57\n",
      "I'm working...2019-03-11 13:16:38\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'm working...2019-03-11 13:18:19\n",
      "I'm working...2019-03-11 13:20:00\n",
      "I'm working...2019-03-11 13:21:40\n",
      "I'm working...2019-03-11 13:23:21\n",
      "I'm working...2019-03-11 13:25:02\n",
      "I'm working...2019-03-11 13:26:43\n",
      "I'm working...2019-03-11 13:30:04\n",
      "I'm working...2019-03-11 13:31:45\n",
      "I'm working...2019-03-11 13:33:26\n",
      "I'm working...2019-03-11 13:35:07\n",
      "I'm working...2019-03-11 13:36:47\n",
      "I'm working...2019-03-11 13:38:28\n",
      "I'm working...2019-03-11 13:40:09\n",
      "I'm working...2019-03-11 13:41:50\n",
      "I'm working...2019-03-11 13:43:30\n",
      "I'm working...2019-03-11 13:45:11\n",
      "I'm working...2019-03-11 13:46:52\n",
      "I'm working...2019-03-11 13:48:32\n",
      "I'm working...2019-03-11 13:50:13\n",
      "I'm working...2019-03-11 13:51:54\n",
      "I'm working...2019-03-11 13:53:35\n",
      "I'm working...2019-03-11 13:55:15\n",
      "I'm working...2019-03-11 13:56:56\n",
      "I'm working...2019-03-11 13:58:37\n",
      "I'm working...2019-03-11 14:00:18\n",
      "I'm working...2019-03-11 14:01:58\n",
      "I'm working...2019-03-11 14:03:39\n",
      "I'm working...2019-03-11 14:05:20\n",
      "I'm working...2019-03-11 14:07:01\n",
      "I'm working...2019-03-11 14:08:42\n",
      "I'm working...2019-03-11 14:10:22\n",
      "I'm working...2019-03-11 14:12:03\n",
      "I'm working...2019-03-11 14:13:44\n",
      "I'm working...2019-03-11 14:15:25\n",
      "I'm working...2019-03-11 14:17:05\n",
      "I'm working...2019-03-11 14:18:46\n",
      "I'm working...2019-03-11 14:20:27\n",
      "I'm working...2019-03-11 14:22:08\n",
      "I'm working...2019-03-11 14:23:48\n",
      "I'm working...2019-03-11 14:25:29\n",
      "I'm working...2019-03-11 14:27:10\n",
      "I'm working...2019-03-11 14:28:51\n",
      "I'm working...2019-03-11 14:30:32\n",
      "I'm working...2019-03-11 14:32:12\n",
      "I'm working...2019-03-11 14:33:53\n",
      "I'm working...2019-03-11 14:35:34\n",
      "I'm working...2019-03-11 14:37:15\n",
      "I'm working...2019-03-11 14:38:55\n",
      "I'm working...2019-03-11 14:40:36\n",
      "I'm working...2019-03-11 14:42:17\n",
      "I'm working...2019-03-11 14:43:57\n",
      "I'm working...2019-03-11 14:45:38\n",
      "I'm working...2019-03-11 14:47:19\n",
      "I'm working...2019-03-11 14:48:59\n",
      "I'm working...2019-03-11 14:50:40\n",
      "I'm working...2019-03-11 14:52:21\n",
      "I'm working...2019-03-11 14:54:02\n",
      "I'm working...2019-03-11 14:55:42\n",
      "I'm working...2019-03-11 14:57:23\n",
      "I'm working...2019-03-11 14:59:04\n",
      "I'm working...2019-03-11 15:00:45\n",
      "I'm working...2019-03-11 15:02:25\n",
      "I'm working...2019-03-11 15:04:06\n",
      "I'm working...2019-03-11 15:05:47\n",
      "I'm working...2019-03-11 15:07:27\n",
      "I'm working...2019-03-11 15:09:08\n",
      "I'm working...2019-03-11 15:10:49\n",
      "I'm working...2019-03-11 15:12:30\n",
      "I'm working...2019-03-11 15:14:10\n",
      "I'm working...2019-03-11 15:15:51\n",
      "I'm working...2019-03-11 15:17:32\n",
      "I'm working...2019-03-11 15:19:13\n",
      "I'm working...2019-03-11 15:20:54\n",
      "I'm working...2019-03-11 15:22:34\n",
      "I'm working...2019-03-11 15:24:15\n",
      "I'm working...2019-03-11 15:25:56\n",
      "I'm working...2019-03-11 15:27:37\n",
      "I'm working...2019-03-11 15:29:17\n",
      "I'm working...2019-03-11 15:30:58\n",
      "I'm working...2019-03-11 15:32:39\n",
      "I'm working...2019-03-11 15:34:20\n",
      "I'm working...2019-03-11 15:36:00\n",
      "I'm working...2019-03-11 15:37:41\n",
      "I'm working...2019-03-11 15:39:22\n",
      "I'm working...2019-03-11 15:41:02\n",
      "I'm working...2019-03-11 15:42:43\n",
      "I'm working...2019-03-11 15:44:24\n",
      "I'm working...2019-03-11 15:46:04\n",
      "I'm working...2019-03-11 15:47:45\n",
      "I'm working...2019-03-11 15:49:26\n",
      "I'm working...2019-03-11 15:51:07\n",
      "I'm working...2019-03-11 15:52:47\n",
      "I'm working...2019-03-11 15:54:28\n",
      "I'm working...2019-03-11 15:56:09\n",
      "I'm working...2019-03-11 15:57:50\n",
      "I'm working...2019-03-11 15:59:30\n",
      "I'm working...2019-03-11 16:01:11\n",
      "I'm working...2019-03-11 16:02:52\n",
      "I'm working...2019-03-11 16:04:33\n",
      "I'm working...2019-03-11 16:06:13\n",
      "I'm working...2019-03-11 16:07:54\n",
      "I'm working...2019-03-11 16:09:35\n",
      "I'm working...2019-03-11 16:11:16\n",
      "I'm working...2019-03-11 16:12:56\n",
      "I'm working...2019-03-11 16:14:37\n",
      "I'm working...2019-03-11 16:16:18\n",
      "I'm working...2019-03-11 16:17:59\n",
      "I'm working...2019-03-11 16:19:39\n",
      "I'm working...2019-03-11 16:21:20\n",
      "I'm working...2019-03-11 16:23:01\n",
      "I'm working...2019-03-11 16:24:41\n",
      "I'm working...2019-03-11 16:26:22\n",
      "I'm working...2019-03-11 16:28:03\n",
      "I'm working...2019-03-11 16:29:44\n",
      "I'm working...2019-03-11 16:31:24\n",
      "I'm working...2019-03-11 16:33:05\n",
      "I'm working...2019-03-11 16:34:46\n",
      "I'm working...2019-03-11 16:36:26\n",
      "I'm working...2019-03-11 16:38:07\n",
      "I'm working...2019-03-11 16:39:48\n",
      "I'm working...2019-03-11 16:41:29\n",
      "I'm working...2019-03-11 16:43:09\n",
      "I'm working...2019-03-11 16:44:50\n",
      "I'm working...2019-03-11 16:48:12\n",
      "I'm working...2019-03-11 16:49:52\n",
      "I'm working...2019-03-11 16:51:33\n",
      "I'm working...2019-03-11 16:53:14\n",
      "I'm working...2019-03-11 16:54:55\n",
      "I'm working...2019-03-11 16:56:35\n",
      "I'm working...2019-03-11 16:58:16\n",
      "I'm working...2019-03-11 16:59:57\n",
      "I'm working...2019-03-11 17:01:38\n",
      "I'm working...2019-03-11 17:03:18\n",
      "I'm working...2019-03-11 17:04:59\n",
      "I'm working...2019-03-11 17:06:40\n",
      "I'm working...2019-03-11 17:08:21\n",
      "I'm working...2019-03-11 17:10:01\n",
      "I'm working...2019-03-11 17:11:42\n",
      "I'm working...2019-03-11 17:13:23\n",
      "I'm working...2019-03-11 17:15:04\n",
      "I'm working...2019-03-11 17:16:45\n",
      "I'm working...2019-03-11 17:18:25\n",
      "I'm working...2019-03-11 17:20:06\n",
      "I'm working...2019-03-11 17:21:47\n",
      "I'm working...2019-03-11 17:23:27\n",
      "I'm working...2019-03-11 17:25:08\n",
      "I'm working...2019-03-11 17:26:49\n",
      "I'm working...2019-03-11 17:28:29\n",
      "I'm working...2019-03-11 17:30:10\n",
      "I'm working...2019-03-11 17:31:51\n",
      "I'm working...2019-03-11 17:33:32\n",
      "I'm working...2019-03-11 17:35:12\n",
      "I'm working...2019-03-11 17:36:53\n",
      "I'm working...2019-03-11 17:38:34\n",
      "I'm working...2019-03-11 17:40:15\n",
      "I'm working...2019-03-11 17:41:55\n",
      "I'm working...2019-03-11 17:43:36\n",
      "I'm working...2019-03-11 17:45:17\n",
      "I'm working...2019-03-11 17:46:58\n",
      "I'm working...2019-03-11 17:48:39\n",
      "I'm working...2019-03-11 17:50:19\n",
      "I'm working...2019-03-11 17:52:00\n",
      "I'm working...2019-03-11 17:53:41\n",
      "I'm working...2019-03-11 17:55:21\n",
      "I'm working...2019-03-11 17:57:02\n",
      "I'm working...2019-03-11 17:58:43\n",
      "I'm working...2019-03-11 18:00:24\n",
      "I'm working...2019-03-11 18:02:04\n",
      "I'm working...2019-03-11 18:03:45\n",
      "I'm working...2019-03-11 18:05:26\n",
      "I'm working...2019-03-11 18:07:07\n",
      "I'm working...2019-03-11 18:08:47\n",
      "I'm working...2019-03-11 18:10:28\n",
      "I'm working...2019-03-11 18:12:09\n",
      "I'm working...2019-03-11 18:13:50\n",
      "I'm working...2019-03-11 18:15:30\n",
      "I'm working...2019-03-11 18:17:11\n",
      "I'm working...2019-03-11 18:18:52\n",
      "I'm working...2019-03-11 18:20:32\n",
      "I'm working...2019-03-11 18:22:13\n",
      "I'm working...2019-03-11 18:23:54\n",
      "I'm working...2019-03-11 18:25:35\n",
      "I'm working...2019-03-11 18:27:15\n",
      "I'm working...2019-03-11 18:28:56\n",
      "I'm working...2019-03-11 18:30:37\n",
      "I'm working...2019-03-11 18:32:18\n",
      "I'm working...2019-03-11 18:33:59\n",
      "I'm working...2019-03-11 18:35:39\n",
      "I'm working...2019-03-11 18:37:20\n",
      "I'm working...2019-03-11 18:39:01\n",
      "I'm working...2019-03-11 18:40:41\n",
      "I'm working...2019-03-11 18:42:22\n",
      "I'm working...2019-03-11 18:44:03\n",
      "I'm working...2019-03-11 18:45:43\n",
      "I'm working...2019-03-11 18:47:24\n",
      "I'm working...2019-03-11 18:49:05\n",
      "I'm working...2019-03-11 18:50:46\n",
      "I'm working...2019-03-11 18:52:26\n",
      "I'm working...2019-03-11 18:54:07\n",
      "I'm working...2019-03-11 18:55:48\n",
      "I'm working...2019-03-11 18:57:28\n",
      "I'm working...2019-03-11 18:59:09\n",
      "I'm working...2019-03-11 19:00:50\n",
      "I'm working...2019-03-11 19:02:31\n",
      "I'm working...2019-03-11 19:04:11\n",
      "I'm working...2019-03-11 19:05:52\n",
      "I'm working...2019-03-11 19:07:33\n",
      "I'm working...2019-03-11 19:09:14\n",
      "I'm working...2019-03-11 19:10:54\n",
      "I'm working...2019-03-11 19:12:35\n",
      "I'm working...2019-03-11 19:14:16\n",
      "I'm working...2019-03-11 19:15:57\n",
      "I'm working...2019-03-11 19:17:37\n",
      "I'm working...2019-03-11 19:19:18\n",
      "I'm working...2019-03-11 19:20:59\n",
      "I'm working...2019-03-11 19:22:39\n",
      "I'm working...2019-03-11 19:24:20\n",
      "I'm working...2019-03-11 19:26:01\n",
      "I'm working...2019-03-11 19:27:42\n",
      "I'm working...2019-03-11 19:29:22\n",
      "I'm working...2019-03-11 19:31:03\n",
      "I'm working...2019-03-11 19:32:44\n",
      "I'm working...2019-03-11 19:34:25\n",
      "I'm working...2019-03-11 19:36:06\n",
      "I'm working...2019-03-11 19:37:46\n",
      "I'm working...2019-03-11 19:39:27\n",
      "I'm working...2019-03-11 19:41:08\n",
      "I'm working...2019-03-11 19:42:48\n",
      "I'm working...2019-03-11 19:44:29\n",
      "I'm working...2019-03-11 19:46:10\n",
      "I'm working...2019-03-11 19:47:50\n",
      "I'm working...2019-03-11 19:49:31\n",
      "I'm working...2019-03-11 19:51:12\n",
      "I'm working...2019-03-11 19:52:53\n",
      "I'm working...2019-03-11 19:54:33\n",
      "I'm working...2019-03-11 19:56:14\n",
      "I'm working...2019-03-11 19:57:55\n",
      "I'm working...2019-03-11 19:59:35\n",
      "I'm working...2019-03-11 20:01:16\n",
      "I'm working...2019-03-11 20:02:57\n",
      "I'm working...2019-03-11 20:04:38\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'm working...2019-03-11 20:06:18\n",
      "I'm working...2019-03-11 20:07:59\n",
      "I'm working...2019-03-11 20:09:40\n",
      "I'm working...2019-03-11 20:11:21\n",
      "I'm working...2019-03-11 20:13:01\n",
      "I'm working...2019-03-11 20:14:42\n",
      "I'm working...2019-03-11 20:16:23\n",
      "I'm working...2019-03-11 20:18:04\n",
      "I'm working...2019-03-11 20:19:45\n",
      "I'm working...2019-03-11 20:21:25\n",
      "I'm working...2019-03-11 20:23:06\n",
      "I'm working...2019-03-11 20:24:47\n",
      "I'm working...2019-03-11 20:26:28\n",
      "I'm working...2019-03-11 20:28:08\n",
      "I'm working...2019-03-11 20:29:49\n",
      "I'm working...2019-03-11 20:31:30\n",
      "I'm working...2019-03-11 20:33:11\n",
      "I'm working...2019-03-11 20:34:51\n",
      "I'm working...2019-03-11 20:36:32\n",
      "I'm working...2019-03-11 20:38:13\n",
      "I'm working...2019-03-11 20:39:54\n",
      "I'm working...2019-03-11 20:41:34\n",
      "I'm working...2019-03-11 20:43:15\n",
      "I'm working...2019-03-11 20:44:56\n",
      "I'm working...2019-03-11 20:46:36\n",
      "I'm working...2019-03-11 20:48:17\n",
      "I'm working...2019-03-11 20:49:58\n",
      "I'm working...2019-03-11 20:51:39\n",
      "I'm working...2019-03-11 20:53:19\n",
      "I'm working...2019-03-11 20:55:00\n",
      "I'm working...2019-03-11 20:56:41\n",
      "I'm working...2019-03-11 20:58:22\n",
      "I'm working...2019-03-11 21:00:02\n",
      "I'm working...2019-03-11 21:01:43\n",
      "I'm working...2019-03-11 21:03:24\n",
      "I'm working...2019-03-11 21:05:04\n",
      "I'm working...2019-03-11 21:06:45\n",
      "I'm working...2019-03-11 21:08:26\n",
      "I'm working...2019-03-11 21:10:07\n",
      "I'm working...2019-03-11 21:11:47\n",
      "I'm working...2019-03-11 21:13:28\n",
      "I'm working...2019-03-11 21:15:09\n",
      "I'm working...2019-03-11 21:16:50\n",
      "I'm working...2019-03-11 21:18:30\n",
      "I'm working...2019-03-11 21:20:11\n",
      "I'm working...2019-03-11 21:21:52\n",
      "I'm working...2019-03-11 21:23:33\n",
      "I'm working...2019-03-11 21:25:13\n",
      "I'm working...2019-03-11 21:26:54\n",
      "I'm working...2019-03-11 21:28:35\n",
      "I'm working...2019-03-11 21:30:15\n",
      "I'm working...2019-03-11 21:31:56\n",
      "I'm working...2019-03-11 21:33:37\n",
      "I'm working...2019-03-11 21:35:17\n",
      "I'm working...2019-03-11 21:36:58\n",
      "I'm working...2019-03-11 21:38:39\n",
      "I'm working...2019-03-11 21:40:20\n",
      "I'm working...2019-03-11 21:42:00\n",
      "I'm working...2019-03-11 21:43:41\n",
      "I'm working...2019-03-11 21:45:22\n",
      "I'm working...2019-03-11 21:47:02\n",
      "I'm working...2019-03-11 21:48:43\n",
      "I'm working...2019-03-11 21:50:24\n",
      "I'm working...2019-03-11 21:52:04\n",
      "I'm working...2019-03-11 21:53:45\n",
      "I'm working...2019-03-11 21:55:26\n",
      "I'm working...2019-03-11 21:57:06\n",
      "I'm working...2019-03-11 21:58:47\n",
      "I'm working...2019-03-11 22:00:28\n",
      "I'm working...2019-03-11 22:02:09\n",
      "I'm working...2019-03-11 22:03:50\n",
      "I'm working...2019-03-11 22:05:30\n",
      "I'm working...2019-03-11 22:07:11\n",
      "I'm working...2019-03-11 22:08:52\n",
      "I'm working...2019-03-11 22:10:33\n",
      "I'm working...2019-03-11 22:12:14\n",
      "I'm working...2019-03-11 22:13:54\n",
      "I'm working...2019-03-11 22:15:35\n",
      "I'm working...2019-03-11 22:17:16\n"
     ]
    }
   ],
   "source": [
    "import schedule\n",
    "import time\n",
    "\n",
    "def job():\n",
    "    print(\"I'm working...\"+time.strftime('%Y-%m-%d %H:%M:%S'))\n",
    "    \n",
    "schedule.every(100).seconds.do(job)\n",
    "def job_do():\n",
    "    \n",
    "    now = datetime.datetime.now()\n",
    "    now_month=now.month\n",
    "    last_month= now - datetime.timedelta(days=now.day)\n",
    "    last_month=last_month.month\n",
    "    \n",
    "    filehelp.send(f\"截至今天 { time.strftime('%Y-%m-%d %H:%M:%S')}\")\n",
    "    filehelp.send(per_month_total(man,now_month).money_of_month())\n",
    "    filehelp.send(per_month_total(man,last_month).money_of_month())\n",
    "    \n",
    "schedule.every().sunday.at(\"23:51\").do(job_do)\n",
    "while True:\n",
    "    schedule.run_pending()\n",
    "    time.sleep(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.datetime(2019, 3, 10, 23, 43, 26, 156341)"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "\n",
    "\n",
    "now"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'now_month' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-4-62703578c778>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m     19\u001b[0m \u001b[0mschedule\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mevery\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msunday\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mat\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"23:49\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdo\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mjob_do\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     20\u001b[0m \u001b[1;32mwhile\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 21\u001b[1;33m     \u001b[0mschedule\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_pending\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     22\u001b[0m     \u001b[0mtime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\sun\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\schedule\\__init__.py\u001b[0m in \u001b[0;36mrun_pending\u001b[1;34m()\u001b[0m\n\u001b[0;32m    561\u001b[0m     \u001b[1;33m:\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m:\u001b[0m\u001b[0;31m`\u001b[0m\u001b[0mdefault\u001b[0m \u001b[0mscheduler\u001b[0m \u001b[0minstance\u001b[0m \u001b[1;33m<\u001b[0m\u001b[0mdefault_scheduler\u001b[0m\u001b[1;33m>\u001b[0m\u001b[0;31m`\u001b[0m\u001b[1;33m.\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    562\u001b[0m     \"\"\"\n\u001b[1;32m--> 563\u001b[1;33m     \u001b[0mdefault_scheduler\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_pending\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    564\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    565\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\sun\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\schedule\\__init__.py\u001b[0m in \u001b[0;36mrun_pending\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m     92\u001b[0m         \u001b[0mrunnable_jobs\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mjob\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mjob\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjobs\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mjob\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshould_run\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     93\u001b[0m         \u001b[1;32mfor\u001b[0m \u001b[0mjob\u001b[0m \u001b[1;32min\u001b[0m \u001b[0msorted\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mrunnable_jobs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 94\u001b[1;33m             \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_run_job\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mjob\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     95\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     96\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mrun_all\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdelay_seconds\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\sun\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\schedule\\__init__.py\u001b[0m in \u001b[0;36m_run_job\u001b[1;34m(self, job)\u001b[0m\n\u001b[0;32m    145\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    146\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_run_job\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mjob\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 147\u001b[1;33m         \u001b[0mret\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mjob\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    148\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mret\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mCancelJob\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mor\u001b[0m \u001b[0mret\u001b[0m \u001b[1;32mis\u001b[0m \u001b[0mCancelJob\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    149\u001b[0m             \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcancel_job\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mjob\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\sun\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\schedule\\__init__.py\u001b[0m in \u001b[0;36mrun\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m    464\u001b[0m         \"\"\"\n\u001b[0;32m    465\u001b[0m         \u001b[0mlogger\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0minfo\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'Running job %s'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 466\u001b[1;33m         \u001b[0mret\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mjob_func\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    467\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlast_run\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdatetime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnow\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    468\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_schedule_next_run\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m<ipython-input-2-695c4db1175c>\u001b[0m in \u001b[0;36mjob_do\u001b[1;34m()\u001b[0m\n\u001b[0;32m     12\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     13\u001b[0m     \u001b[0mfilehelp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34mf\"截至今天 { time.strftime('%Y-%m-%d %H:%M:%S')}\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 14\u001b[1;33m     \u001b[0mfilehelp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mper_month_total\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mman\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mnow_month\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmoney_of_month\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     15\u001b[0m     \u001b[0mfilehelp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mper_month_total\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mman\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mlast_month\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmoney_of_month\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     16\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNameError\u001b[0m: name 'now_month' is not defined"
     ]
    }
   ],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 时间操作 arrow 库"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2019-02-28 23:26:43\n"
     ]
    },
    {
     "ename": "UnboundLocalError",
     "evalue": "local variable 'cnt' referenced before assignment",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mUnboundLocalError\u001b[0m                         Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-17-6e09cb6de74b>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      8\u001b[0m     \u001b[0mcnt\u001b[0m\u001b[1;33m+=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      9\u001b[0m     \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcnt\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 10\u001b[1;33m \u001b[0mjob\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     11\u001b[0m \u001b[0mjob\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m<ipython-input-17-6e09cb6de74b>\u001b[0m in \u001b[0;36mjob\u001b[1;34m()\u001b[0m\n\u001b[0;32m      6\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mjob\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      7\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 8\u001b[1;33m     \u001b[0mcnt\u001b[0m\u001b[1;33m+=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      9\u001b[0m     \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcnt\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     10\u001b[0m \u001b[0mjob\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mUnboundLocalError\u001b[0m: local variable 'cnt' referenced before assignment"
     ]
    }
   ],
   "source": [
    "now = datetime.datetime.now()\n",
    "d4 = now - datetime.timedelta(days=now.day)\n",
    "print(d4.strftime(\"%Y-%m-%d %H:%S:%M\"))\n",
    "now\n",
    "cnt=0\n",
    "def job():\n",
    "    global cnt\n",
    "    cnt+=1\n",
    "    print(cnt)\n",
    "job()\n",
    "job()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\n",
      "Collecting schedule\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/57/22/3a709462eb02412bd1145f6e53604f36bba191e3e4e397bea4a718fec38c/schedule-0.6.0-py2.py3-none-any.whl\n",
      "Installing collected packages: schedule\n",
      "Successfully installed schedule-0.6.0\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "You are using pip version 19.0.2, however version 19.0.3 is available.\n",
      "You should consider upgrading via the 'python -m pip install --upgrade pip' command.\n"
     ]
    }
   ],
   "source": [
    "! pip install -i https://pypi.tuna.tsinghua.edu.cn/simple schedule"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "165px"
   },
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
